home *** CD-ROM | disk | FTP | other *** search
- jmetawidgets.tcl\n\nIntroduction\nThe\ jmetawidgets.tcl\ library\ is\ distributed\ as\ part\ of\ the\ jstools\ package.\ \ It\ consists\ of\ procedures\ to\ create\ compound\ widgets,\ including\ a\ buttonbar,\ a\ colour\ chooser,\ and\ a\ labelled\ entry\ widget\ used\ to\ set\ a\ global\ variable.\n\nThis\ document\ describes\ jmetawidgets.tcl\ version\ 3.6/3.0.\n\nUsage\nAccessing\ the\ Library\nIn\ order\ to\ use\ the\ jmetawidgets.tcl\ library,\ it\ (and\ any\ other\ libraries\ it\ depends\ on)\ must\ be\ in\ your\ Tcl\ auto_path,\ described\ in\ tclvars(n).\ \ Information\ about\ how\ to\ arrange\ that,\ and\ other\ conventions\ common\ to\ the\ jstools\ libraries,\ is\ in\ the\ Usage\ section\ of\ The\ jstools\ Libraries.\n\nCredits\ and\ Copyright\nAuthor\nJay\ Sekora\ \njs@bu.edu\nhttp://shore.net/~js/\n\nCopyright\nThe\ library\ is\ copyright\ ⌐\ 1992-1994\ by\ Jay\ Sekora,\ but\ may\ be\ freely\ copied\ and\ modified\ for\ non¡commercial\ purposes.\ \ (Please\ contact\ me\ if\ you\ want\ to\ use\ it\ for\ a\ commercial\ purpose,\ this\ may\ be\ OK\ under\ some\ circumstances.)\n\nOverview\nProcedures\nj:buttonbar\ -\ group\ of\ command\ buttons\nj:colour_chooser\ -\ preference\ widget\ for\ selecting\ colors\nj:variable_entry\ -\ labelled\ entry\ to\ set\ a\ global\ variable\n\nSee\ Also\nj:filler\ in\ jtkutils.tcl\nj:rule\ in\ jtkutils.tcl\n\nj:buttonbar\nUsage\n\tj:buttonbar\ w\ \[options\]\nArgument\n\tw\ is\ the\ pathname\ of\ the\ new\ frame\ widget\ to\ create\nOptions\n\t-default\ defaultbutton\ \ (default\ (NONE))\n\t-padx\ padx\ \ (default\ 5)\n\t-pady\ pady\ \ (default\ 5)\n\t-orient\ horizontal|vertical\ \ (default\ horizontal)\n\t-buttons\ buttonlist\ \ (default\ {})\n\t\n\tbuttonlist\ is\ a\ list\ of\ {name\ text\ command}...\ sublists\nExample\n\tj:buttonbar\ .foo.b\ -default\ ok\ -buttons\ {\n\t\ \ {\n\t\ \ \ \ ok\ OK\ {apply_changes\;\ exit\ 0}\n\t\ \ }\n\t\ \ {\n\t\ \ \ \ cancel\ Cancel\ {exit\ 0}\n\t\ \ }\n\t}\n\tpack\ .foo.b\ -in\ .foo\ -side\ bottom\ -fill\ x\n\nDescription\nThis\ procedure\ creates\ a\ horizontal\ (by\ default)\ row\ of\ buttons,\ with\ some\ spacing\ between\ and\ around\ them.\ \ Each\ element\ in\ the\ buttonlist\ will\ create\ a\ button\ with\ the\ name\ w.name,\ the\ label\ text,\ and\ the\ command\ command.\ \ The\ buttons\ will\ be\ created\ from\ right\ to\ left,\ and\ each\ button\ will\ be\ at\ least\ eight\ characters\ wide\ (for\ visual\ consistency).\ \ The\ button\ with\ the\ name\ default\ (if\ any)\ will\ be\ surrounded\ with\ a\ sunken\ rectangle.\n\nIf\ given,\ padx\ and\ pady\ specify\ the\ space\ to\ add\ around\ the\ edges\ of\ the\ group\ of\ buttons.\ \ The\ default\ is\ to\ add\ five\ pixels\ around\ the\ group\ of\ buttons.\ \ These\ options\ do\ not\ affect\ the\ spacing\ between\ buttons..\n\nIf\ -orient\ vertical\ is\ specified,\ the\ buttons\ will\ be\ laid\ out\ vertically\ (starting\ at\ the\ botton),\ rather\ than\ horizontally.\n\nIf\ you\ need\ to\ do\ complicated\ substitution\ on\ the\ commands\ of\ the\ buttons,\ you\ may\ find\ it\ useful\ to\ create\ the\ buttons\ with\ empty\ commands\ and\ add\ the\ commands\ after\ creating\ the\ buttons\ with\ w.name\ configure\ -command\ command\ for\ each\ button\ name.\ \ Alternatively,\ format(n)\ can\ be\ useful.\n\nYou\ may\ find\ j:default_button\ and\ j:cancel_button\ (both\ in\ jtkutils.tcl)\ useful\ with\ j:buttonbar.\n\nj:colour_chooser\nUsage\n\tj:colour_chooser\ w\ \[options\]\nArgument\n\tw\ is\ the\ pathname\ of\ the\ new\ frame\ widget\ to\ create\nOptions\n\t-label\ label\ \ (default\ Colour:)\n\t-variable\ var\ \ (default\ j_prefs_colour\ -\ not\ really\ optional)\nExample\n\tpack\ \[j:colour_chooser\ \\\n\t\ \ .foo.fg\ -label\ \"Foreground:\"\ \\\n\t\ \ -variable\ APPPREFS(fg)\]\ \\\n\t\ \ \[j:colour_chooser\ \\\n\t\ \ .foo.bg\ -label\ \"Background:\"\ \\\n\t\ \ -variable\ APPPREFS(bg)\]\ \\\n\t\ \ -in\ .foo\ -side\ top\ -fill\ x\n\nDescription\nThis\ procedure\ creates\ a\ pseudo¡widget\ suitable\ for\ choosing\ colours,\ which\ is\ useful\ for\ constructing\ things\ like\ preferences\ panels.\ \ The\ pseudo¡widget\ has\ a\ label\ on\ the\ left¡hand\ side,\ a\ small\ patch\ of\ the\ colour\ (raised,\ so\ the\ user\ can\ see\ how\ 3-D\ effects\ will\ look),\ and\ two\ buttons\ labelled\ RGB\ and\ Name.\ \ The\ RGB\ and\ Name\ buttons\ pop\ up\ j:prompt_colour_rgb\ and\ j:prompt_colour_name\ panels\ respectively\ (both\ in\ jprompts.tcl),\ allowing\ the\ user\ to\ choose\ a\ colour.\ \ The\ variable\ var,\ which\ should\ be\ a\ global\ variable\ or\ an\ element\ of\ a\ global\ array,\ is\ set\ to\ the\ colour\ the\ user\ chooses.\ \ Typically,\ this\ would\ be\ an\ element\ of\ an\ array,\ so\ that\ the\ routines\ in\ jprefs.tcl\ can\ be\ used\ to\ save\ and\ restore\ it.\n\nj:variable_entry\nUsage\n\tj:variable_entry\ w\ \[options\]\nArgument\n\tw\ is\ the\ pathname\ of\ the\ new\ frame\ to\ create\nOptions\n\t-label\ label\ \ (default\ Value:)\n\t-variable\ var\ \ (default\ value\ -\ not\ really\ optional)\n\t-labelwidth\ lw\ \ (default\ 16)\n\t-entrywidth\ ew\ \ (default\ 40)\n\t-labelconfig\ lc\ \ (default\ {})\n\t-entryconfig\ ec\ \ (default\ {})\nExample\n\ttoplevel\ .find\n\tj:variable_entry\ .find.search\ \\\n\t\ \ -label\ \"Search\ for:\"\ -variable\ j_find(searchfor)\n\tj:variable_entry\ .find.replace\ \\\n\t\ \ -label\ \"Replace\ with:\"\ -variable\ j_find(replacewith)\n\tpack\ .find.search\ .find.replace\ -in\ .find\n\nDescription\nThis\ procedure\ creates\ a\ labelled\ entry\ linked\ to\ a\ global\ variable\ (or\ an\ element\ in\ a\ global\ array).\ \ If\ -labelwidth\ is\ given,\ the\ label\ to\ the\ left\ of\ the\ entry\ will\ be\ lw\ characters\ wide\;\ otherwise\ it\ will\ be\ 16\ characters\ wide.\ \ If\ -entrywidth\ is\ given,\ the\ entry\ will\ be\ ew\ characters\ wide\;\ otherwise\ it\ will\ be\ 40\ characters\ wide.\ \ If\ you\ wish\ to\ configure\ the\ label\ or\ the\ entry\ further\ (say,\ to\ specify\ a\ font),\ you\ can\ specify\ -labelconfig\ or\ -entryconfig\ with\ a\ list\ of\ configuration\ options,\ for\ instance\ `-entryconfig\ {-font\ 12x24}'\ or\ `-labelconfig\ {-foreground\ red}'.\n\nThe\ -variable\ var\ option\ isn't\ really\ optional\ for\ practical\ purposes\;\ it\ specifies\ the\ global\ variable\ that\ will\ hold\ the\ contents\ of\ the\ entry\ widget.\n\nYou\ may\ find\ j:tab_ring\ (in\ jtkutils.tcl)\ useful\ with\ j:variable_entry.\n\nEvolution\nFeel\ free\ to\ report\ bugs\ (and\ feature\ requests)\ to\ me,\ <js@bu.edu>,\ and\ I\ will\ try\ to\ deal\ with\ them.\ \ Also,\ feel\ free\ to\ fix\ bugs\ or\ add\ features\ on\ your\ own\ and\ let\ me\ know\ how\ you\ did\ it.\n\nChanges\n*\ These\ procedures\ used\ to\ be\ in\ a\ file\ called\ jlibrary.tcl.\ \ Starting\ with\ version\ 3.6/2.0,\ they're\ in\ their\ own\ independent\ library.\n\nFuture\ Directions\n*\ There\ should\ be\ a\ j:buttonbar:button\ procedure\ to\ add\ a\ button\ to\ an\ existing\ buttonbar.\n\n*\ j:colour_chooser\ and\ j:variable_entry\ should\ take\ more\ options\ to\ control\ their\ appearance.\n\n*\ These\ procedures\ should\ create\ pseudo-widget\ commands,\ so\ you\ could\ say\ things\ like\ `.foo.buttonbar\ configure\ -default\ cancel'.\n\n*\ Procedures\ that\ use\ global\ variables\ shouldn't.\ \ They\ should\ use\ variables\ in\ the\ caller's\ context,\ which\ can\ be\ global\ or\ not\ as\ the\ caller\ sees\ fit.\n {{{jdoc:xref:link {4.59 4.66 10.217 10.238 10.246 10.263 10.267 10.288 23.0 23.11 24.0 24.16 25.0 25.16 28.0 28.8 28.12 28.24 29.0 29.6 29.10 29.22 64.13 64.29 64.34 64.49 64.59 64.71 84.346 84.365 84.370 84.390 84.420 84.432 84.672 84.682 111.13 111.23 111.28 111.40}} {jdoc:xref:manpage {10.133 10.140 62.265 62.271}} {jdoc:anchor:anchorname {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 31.0 32.0 66.0 67.0 86.0 87.0 113.0 114.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.20 4.59 4.66 6.24 6.40 8.0 10.0 10.20 10.36 10.109 10.118 10.133 10.140 10.221 10.228 10.250 10.255 10.267 10.288 12.0 14.0 15.0 15.9 16.0 16.21 18.0 19.0 21.0 23.11 24.0 24.16 25.0 25.16 25.41 25.43 26.0 28.8 28.12 28.24 29.0 29.6 29.10 29.22 31.0 33.0 33.1 33.15 33.16 33.23 34.0 35.0 35.1 35.2 36.0 37.0 37.1 37.25 37.34 37.40 38.1 38.13 38.22 38.23 39.1 39.13 39.22 39.23 40.1 40.19 40.20 40.30 40.39 40.49 41.1 41.22 41.31 41.33 43.1 43.11 43.25 43.44 44.0 54.0 55.0 56.0 56.129 56.139 56.175 56.181 56.193 56.197 56.215 56.222 56.380 56.387 58.10 58.14 58.19 58.23 60.3 60.19 62.193 62.226 62.243 62.247 62.265 62.271 64.13 64.29 64.34 64.49 64.59 64.71 64.85 64.96 66.0 68.0 68.1 68.20 68.21 68.28 69.0 70.0 70.1 70.2 71.0 72.0 72.1 72.15 72.24 72.31 73.1 73.16 73.25 73.39 74.0 82.0 83.0 84.0 84.346 84.365 84.370 84.390 84.420 84.432 84.487 84.490 84.672 84.682 86.0 88.0 88.1 88.20 88.21 88.28 89.0 90.0 90.1 90.2 91.0 92.0 92.1 92.15 92.24 92.30 93.1 93.16 93.25 93.30 94.1 94.17 94.26 94.28 95.1 95.17 95.26 95.28 96.1 96.18 96.27 96.29 97.1 97.18 97.27 97.29 98.0 105.0 106.0 107.0 107.107 107.118 107.172 107.174 107.237 107.248 107.277 107.279 107.437 107.449 107.453 107.465 107.518 107.544 107.550 107.580 109.4 109.13 109.14 109.17 111.13 111.23 111.28 111.40 111.54 111.70 113.0 114.0 114.55 114.66 116.0 116.7 117.47 117.59 119.0 119.17 120.20 120.38 122.2 122.18 122.23 122.39 124.87 124.127 127.0}} {richtext:font:italic {33.13 33.14 33.16 33.23 35.1 35.2 37.10 37.23 38.7 38.11 39.7 39.11 41.10 41.20 43.1 43.11 43.26 43.30 43.31 43.35 43.36 43.43 56.129 56.139 56.175 56.176 56.177 56.181 56.193 56.197 56.215 56.222 56.380 56.387 58.10 58.14 58.19 58.23 62.193 62.194 62.195 62.199 62.219 62.226 62.243 62.247 68.18 68.19 68.21 68.28 70.1 70.2 72.8 72.13 73.11 73.14 84.487 84.490 88.18 88.19 88.21 88.28 90.1 90.2 92.8 92.13 93.11 93.14 94.13 94.15 95.13 95.15 96.14 96.16 97.14 97.16 107.172 107.174 107.277 107.279 109.14 109.17}} {richtext:font:bold {4.4 4.20 4.59 4.66 6.24 6.40 10.20 10.36 10.221 10.228 28.12 28.24 29.10 29.22 64.59 64.71 84.420 84.432 84.672 84.682 111.28 111.40 117.47 117.59}} {richtext:font:bolditalic {10.250 10.255 10.267 10.288}} {richtext:font:typewriter {10.109 10.118 10.133 10.140 15.0 15.9 16.0 16.21 23.0 23.11 24.0 24.16 25.0 25.16 25.41 25.43 26.0 27.0 28.0 28.8 29.0 29.6 33.1 33.13 33.14 33.15 37.1 37.10 37.23 37.25 37.34 37.40 38.1 38.7 38.11 38.13 38.22 38.23 39.1 39.7 39.11 39.13 39.22 39.23 40.1 40.19 40.20 40.30 40.39 40.49 41.1 41.10 41.20 41.22 41.31 41.33 43.25 43.26 43.30 43.31 43.35 43.36 43.43 43.44 45.0 54.0 56.176 56.177 60.3 60.19 62.194 62.195 62.199 62.219 62.265 62.271 64.13 64.29 64.34 64.49 64.85 64.96 68.1 68.18 68.19 68.20 72.1 72.8 72.13 72.15 72.24 72.31 73.1 73.11 73.14 73.16 73.25 73.39 75.0 82.0 84.346 84.365 84.370 84.390 88.1 88.18 88.19 88.20 92.1 92.8 92.13 92.15 92.24 92.30 93.1 93.11 93.14 93.16 93.25 93.30 94.1 94.13 94.15 94.17 94.26 94.28 95.1 95.13 95.15 95.17 95.26 95.28 96.1 96.14 96.16 96.18 96.27 96.29 97.1 97.14 97.16 97.18 97.27 97.29 99.0 105.0 107.107 107.118 107.237 107.248 107.437 107.449 107.453 107.465 107.518 107.544 107.550 107.580 109.4 109.13 111.13 111.23 111.54 111.70 114.55 114.66 120.20 120.38 122.2 122.18 122.23 122.39 124.87 124.127}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 31.0 32.0 66.0 67.0 86.0 87.0 113.0 114.0}} {richtext:font:heading2 {9.0 10.0 13.0 14.0 18.0 19.0 22.0 23.0 27.0 28.0 32.0 33.0 34.0 35.0 36.0 37.0 44.0 45.0 55.0 56.0 67.0 68.0 69.0 70.0 71.0 72.0 74.0 75.0 83.0 84.0 87.0 88.0 89.0 90.0 91.0 92.0 98.0 99.0 106.0 107.0 116.0 116.7 119.0 119.17}} {{} {12.0 20.0 22.0 22.10 118.0 119.0}} {jdoc:link:jstools.jdoc {4.59 4.66}} {jdoc:manpage:tclvars {10.133 10.140}} {jdoc:link:jslibraries.tcl {10.217 10.238}} {jdoc:link:jslibraries.jdoc#Usage {10.246 10.263}} {jdoc:link:#j:buttonbar {23.0 23.11}} {jdoc:link:#j:colour_chooser {24.0 24.16}} {jdoc:link:#j:variable_entry {25.0 25.16}} {jdoc:manpage:format {62.265 62.271}} {jdoc:link:jtkutils.tcl.jdoc {28.12 28.24 29.10 29.22 64.59 64.71 111.28 111.40}} {jdoc:link:jtkutils.tcl.jdoc#j:default_button {64.13 64.29}} {jdoc:link:jtkutils.tcl.jdoc#j:cancel_button {64.34 64.49}} {jdoc:link:jprompts.tcl.jdoc {84.420 84.432}} {jdoc:link:jprompts.tcl#j:prompt_colour_name {84.370 84.390}} {jdoc:link:jprompts.tcl#j:prompt_colour_rgb {84.346 84.365}} {jdoc:link:jprefs.tcl.jdoc {84.672 84.682}} {jdoc:link:jtkutils.tcl.jdoc#j:tab_ring {111.13 111.23}} {jdoc:link:jtkutils.tcl.jdoc#j:filler {28.0 28.8}} {jdoc:link:jtkutils.tcl.jdoc#j:rule {29.0 29.6}} {jdoc:link:jslibraries.jdoc {10.267 10.288}} {jdoc:anchorname:j:buttonbar {31.0 32.0}} {jdoc:anchorname:Overview {21.0 22.0}} {jdoc:anchorname:Credits_and_Copyright {12.0 13.0}} {jdoc:anchorname:Usage {8.0 9.0}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:anchorname:j:colour_chooser {66.0 67.0}} {jdoc:anchorname:j:variable_entry {86.0 87.0}} {jdoc:anchorname:Evolution {113.0 114.0}}} {{richptr 127.0} {del_from 127.0} {matchend 127.0} {abbrevstart 126.2} {abbrevend 126.2} {insert 1.0} {del_to 127.0} {matchstart 127.0} {anchor 1.0} {current 1.16}}}